/*
 * COPYRIGHT. ShenZhen iByte Technology Co., Ltd. 2018.
 * ALL RIGHTS RESERVED.
 *
 * No part of this publication may be reproduced, stored in a retrieval system, or transmitted,
 * on any form or by any means, electronic, mechanical, photocopying, recording, 
 * or otherwise, without the prior written permission of ShenZhen iByte Network Technology Co., Ltd.
 *
 * Amendment History:
 * 
 * Date                   By              Description
 * -------------------    -----------     -------------------------------------------
 * Nov 30, 2018    Li.shangzhi         Create the class
*/
package com.github.icloud.elasticsearch;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.query.QueryBuilder;
/**
 * @FileName ElasticsearchBase.java
 * @Description: 
 *
 * @Date Nov 30, 2018 11:42:30 AM
 * @author Li.shangzhi
 * @version 1.0
 */
public abstract class ElasticsearchClientBase extends ElasticsearchClient {

    protected SearchResponse iEsPrepareSearch(QueryBuilder qb) {
        SearchResponse response = client.prepareSearch("icloud-alarm","icloud-iot-log")	//可以是多个index
                .setTypes("icloud-auth","icloud-monitor-alarm") //可以是多个类型
                .setQuery(qb)    		// Query 查询条件
                .get();
        println(response);
        return response;
    }

}